﻿using System.Net;

namespace ProxyFinder.Strategies {
    public class IntegratedCredentialStrategy : BaseCredentialStrategy{

        public override IWebProxy GetProxy(System.Uri uri) {
            // If we did not find any saved credentials then let's try to use Default Credentials which is
            // used for Integrated Authentication
            WebProxy proxy = GetSystemProxy(uri);
            proxy.Credentials = CredentialCache.DefaultCredentials;
            return proxy;
        }
    }
}
